{include file="public/head"/}
<style>
    .contact {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-box-orient: vertical;
        padding-bottom: 0 !important;
    }

</style>
<script language="javascript">
    $(document).ready(function () {
        $("#tab-base").click(function () {
            $("#table-more").hide();
            $("#table-linkman").hide();
            $("#table-bank").hide();
            $("#table-evaluate").hide();
            $("#table-branch").hide();
            $("#table-base").show();
        });

        $("#tab-more").click(function () {
            $("#table-base").hide();
            $("#table-linkman").hide();
            $("#table-bank").hide();
            $("#table-evaluate").hide();
            $("#table-branch").hide();
            $("#table-more").show();
        });

        $("#tab-linkman").click(function () {
            $("#table-base").hide();
            $("#table-more").hide();
            $("#table-bank").hide();
            $("#table-evaluate").hide();
            $("#table-branch").hide();
            $("#table-linkman").show();
        });

        $("#tab-bank").click(function () {
            $("#table-base").hide();
            $("#table-more").hide();
            $("#table-linkman").hide();
            $("#table-evaluate").hide();
            $("#table-branch").hide();
            $("#table-bank").show();
        });
        $("#tab-branch").click(function () {
            $("#table-base").hide();
            $("#table-more").hide();
            $("#table-linkman").hide();
            $("#table-bank").hide();
            $("#table-evaluate").hide();
            $("#table-branch").show();
        });
        $("#tab-evaluate").click(function () {
            $("#table-base").hide();
            $("#table-more").hide();
            $("#table-linkman").hide();
            $("#table-bank").hide();
            $("#table-branch").hide();
            $("#table-evaluate").show();
        });


        $("#table-base").show();
        $("#table-more").hide();
        $("#table-linkman").hide();
        $("#table-bank").hide();
        $("#table-evaluate").hide();
        $("#table-branch").hide();
    })
</script>


<div class="container-fluid" id="main">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="alert alert-dismissable alert-info" id="headeralert">
                <button type="button" class="close">×</button>
                <p></p>
            </div>
        </div>
    </div>
    <input type="hidden" id="act" name="act" value="{$str}">
    <input type="hidden" name="company_id" id="company_id" value="{$company_id|default=''}">
    <input type="hidden" name="country_id" id="country_id" value="{$country_id|default=''}">

    <div class="ntDesktop">
        <div class="ntDesktop-head"> {if ($str eq 'companyedit')}客户公司({{companyname}})编辑{else/}客户公司添加{/if}</div>

        <div class="row clearfix" style="padding-top:0px">
            <div class="col-md-8 col-sm-8">
                <ul class="nav nav-tabs">
                    <li class="active">
                        <a href="#" data-toggle="tab" id="tab-base">{:strtoupper(lang('summary'))}</a>
                    </li>
                    <li>
                        <a href="#" data-toggle="tab" id="tab-more">{:strtoupper(lang('more_information'))}</a>
                    </li>
                    <li>
                        <a href="#" data-toggle="tab" id="tab-linkman">{:strtoupper(lang('contact'))}</a>
                    </li>
                    <li>
                        <a href="#" data-toggle="tab" id="tab-bank">{:strtoupper(lang('bank_account'))}</a>
                    </li>

                    <li>
                        <a href="#" data-toggle="tab" id="tab-branch">分公司</a>
                    </li>
                    <li>
                        <a href="#" data-toggle="tab" id="tab-evaluate">风评</a>
                    </li>
                </ul>
            </div>
            <div class="col-md-4 col-sm-4 text-right">
                <div>
                    <button type="button" class="btn btn-default" @click="returnlist">
                        <span class="glyphicon glyphicon-chevron-left"></span>{:strtoupper(lang('back_to_list'))}
                    </button>
                    <span style="padding:10px">&nbsp;</span>
                    <button :disabled="isdisadble" @click="subfun" class="btn btn-primary"
                            style="padding-left:48px;padding-right:48px;"> <span
                            class="glyphicon glyphicon-floppy-disk"></span> {:strtoupper(lang('save'))}
                    </button>
                </div>
            </div>
        </div>


        <!-- 概要页面 -->
        <div class="row clearfix" id="table-base">
            <div class="col-md-12 column">
                <table class="table table-striped table-hover ntTable" v-cloak>
                    <tbody>
                    <tr>
                        <td>{:strtoupper(lang('company_type'))}<span class="required"></span></td>
                        <td>
                            <select class="form-control" v-model="data.type_id" @change="changegsfun(2)">
                                <option value="">{:lang('please_select')}</option>
                                <option :value="item.id" v-for="(item,index) in cotypename">{{item.content}}</option>
                            </select>
                        </td>
                        <td>{:strtoupper(lang('belongs_to_seller'))}<span class="required"></span></td>
                        <td>
                            <select class="form-control" v-model="data.saler_id">
                                <option value="">{:lang('please_select')}</option>
                                <option :value="item.id" v-for="(item,index) in managename">{{item.nickname}}</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>{:strtoupper(lang('company_name'))}<span class="required"></span></td>
                        <td colspan="3">
                            <input type="text" class="form-control" v-model="data.name">
                        </td>
                    </tr>
                    <tr>
                        <td>{:strtoupper(lang('address'))}<span class="required"></span></td>
                        <td colspan="3">
                            <div class="col-md-2">
                                <select class="form-control col-md-2" v-model="data.address.country_id"
                                        @change="selchangefun('provinces',data.address.country_id,2)">
                                    <option value="">{:lang('please_select')}</option>
                                    <option :value="item.id" v-for="(item,index) in countryname">{{item.name}}</option>
                                </select>
                            </div>

                            <div class="col-md-4">
                                <select class="form-control" v-model="data.address.province_id"
                                        @change="selchangefun('city',data.address.province_id,2)">
                                    <option value="" selected>{:lang('please_select')}</option>
                                    <option :value="item.id" v-for="(item,index) in provinces">{{item.name}}</option>
                                </select>
                            </div>

                            <div class="col-md-3">
                                <select class="form-control" v-model="data.address.city_id"
                                        @change="selchangefun('town',data.address.city_id,2)">
                                    <option value="" selected>{:lang('please_select')}</option>
                                    <option :value="item.id" v-for="(item,index) in city">{{item.name}}</option>
                                </select>
                            </div>

                            <div class="col-md-3">
                                <select class="form-control" v-model="data.address.town_id">
                                    <option value="" selected>{:lang('please_select')}</option>
                                    <option :value="item.id" v-for="(item,index) in town">{{item.name}}</option>
                                </select>
                            </div>

                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td colspan="3">
                            <input type="text" class="form-control" v-model="data.addr">
                        </td>
                    </tr>
                    <tr>
                        <td>{:strtoupper(lang('ZIP_CODE'))}</td>
                        <td>
                            <input type="text" class="form-control" v-model="data.zipcode">
                        </td>
                        <td>{:strtoupper(lang('status'))}</td>
                        <td>
                            <label class="radio-inline">
                                <input type="radio" name="optionsRadioinline" value="NORMAL"
                                       @click="changestatus('NORMAL')" :checked="data.statuss=='NORMAL'">
                                {:strtoupper(lang('normal'))}
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="optionsRadioinline" value="DRAFT"
                                       @click="changestatus('DRAFT')" :checked="data.statuss=='DRAFT'">
                                {:strtoupper(lang('draft'))}
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="optionsRadioinline" value="LOCK" @click="changestatus('LOCK')"
                                       :checked="data.statuss=='LOCK'"> {:strtoupper(lang('locking'))}
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="optionsRadioinline" value="DEL" @click="changestatus('DEL')"
                                       :checked="data.statuss=='DEL'"> {:strtoupper(lang('delete'))}
                            </label>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>

        <!-- 详细资料页面 -->
        <div class="row clearfix" id="table-more">
            <div class="col-md-12 column">
                <table class="table table-striped table-hover ntTable">
                    <tbody>
                    <tr>
                        <td>{:strtoupper(lang('number_of_employees'))}</td>
                        <td>
                            <select class="form-control" v-model="data.works">
                                <option :value="key" v-for="(item,key,index) in number">{{item}}</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>{:strtoupper(lang('remark'))}</td>
                        <td><textarea class="form-control" v-model="data.remarks"
                                      style="resize: none;">{{data.remarks}}</textarea></td>
                    </tr>
                    <tr>
                        <td>营业号</td>
                        <td><input type="text" class="form-control" v-model="data.regno"></td>
                    </tr>
                    <tr>
                        <td>税号</td>
                        <td><input type="text" class="form-control" v-model="data.taxno"></td>
                    </tr>
                    <tr v-for="(item,index) in attrarr.text">
                        <td>{{item.content}}</td>
                        <td><input type="text" class="form-control" v-model="data.attrval.text[index].val"
                                   placeholder="{:lang('please_enter_content')}"></td>
                    </tr>
                    <tr v-for="(item,index) in attrarr.select">
                        <td>{{item.content}}</td>
                        <td>
                            <select class="form-control" v-model="data.attrval.select[index].val">
                                <option value="0">{:strtoupper(lang('please_select'))}</option>
                                <option :value="val.id" v-for="(val,key) in item.textselect">{{val.content}}</option>
                            </select>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>

        <!-- 联系人页面 -->
        <div id="table-linkman">
            <div class="row clearfix">
                <div class="col-md-12 column text-right">
                    <button @click="addlinkman" type="button" class="btn btn-primary" data-toggle="modal"
                            data-target="#linkman_Modal"><span
                            class="glyphicon glyphicon-plus"></span> {:strtoupper(lang('add_new_contact'))}
                    </button>
                </div>
            </div>
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <table class="table table-striped table-hover ntTable" v-cloak>
                        <thead>
                        <tr>
                            <th>No.</th>
                            <th>{:strtoupper(lang('name'))}</th>
                            <th>{:strtoupper(lang('main'))}</th>
                            <th>{:strtoupper(lang('gender'))}</th>
                            <th>{:strtoupper(lang('contact_information'))}</th>
                            <th>{:strtoupper(lang('edit'))}</th>
                            <th>{:strtoupper(lang('operate'))}</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(item,index) in linkarr">
                            <td align="center">{{formatUnit(index+1,'ID')}}</td>
                            <td>{{item.name}}</td>
                            <td align="center">{{item.is_main==1?'Y':'N'}}</td>
                            <td align="center">{{item.sexman}}</td>
                            <td class="contact">
                                <div v-for="linkmrth in item.linkarr" :key="linkmrth.id">
                                    <span>{{linkmrth.linkname+'：'+linkmrth.content}}</span>
                                </div>
                            </td>
                            <td>{{item.updatename}}<br/>
                                <small>{{item.update_date}}</small>
                            </td>
                            <td class="text-right">
                                <div>
                                    <button @click="editlinkman(index)" type="button" class="btn btn-sm btn-primary"
                                            data-toggle="modal"
                                            data-target="#linkman_Modal"><span
                                            class="glyphicon glyphicon-pencil"></span>{:strtoupper(lang('edit'))}
                                    </button>
                                    <button @click="dellinkman(index)" type="button"
                                            class="btn btn-sm btn-default"><span
                                            class="glyphicon glyphicon-trash"></span>{:strtoupper(lang('delete'))}
                                    </button>
                                </div>
                            </td>
                        </tr>
                        <tr style="text-align: center;" v-if="linkarr.length==0">
                            <td colspan="7" class="no_date">{:strtoupper(lang('no_data'))}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!--银行页面-->
        <div id="table-bank">
            <div class="row clearfix">
                <div class="col-md-12 column text-right">
                    <button @click="addbank" type="button" class="btn btn-primary" data-toggle="modal"
                            data-target="#bank_Modal"><span
                            class="glyphicon glyphicon-plus"></span> {:strtoupper(lang('add_new_account'))}
                    </button>
                </div>
            </div>
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <table class="table table-striped table-hover ntTable" v-cloak>
                        <thead>
                        <tr>
                            <th>{:strtoupper(lang('serial_number'))}</th>
                            <th>{:strtoupper(lang('bank'))}</th>
                            <th>{:strtoupper(lang('account_opening_bank_branch'))}</th>
                            <th>{:strtoupper(lang('account_name'))}</th>
                            <th>{:strtoupper(lang('account'))}</th>
                            <th>{:strtoupper(lang('main'))}</th>
                            <th>{:strtoupper(lang('edit'))}</th>
                            <th>{:strtoupper(lang('operate'))}</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(item,index) in bankarr">
                            <td align="center">{{formatUnit(index+1,'ID')}}</td>
                            <td>{{item.name}}</td>
                            <td>{{item.bankname}}</td>
                            <td>{{item.account_name}}</td>
                            <td>{{item.account_num}}</td>
                            <td align="center">{{item.is_main==1?'Y':'N'}}</td>
                            <td>{{item.updatename}}<br/>
                                <small>{{item.update_date}}</small>
                            </td>
                            <td class="text-right">
                                <div>
                                    <button @click="editbank(index)" type="button" class="btn btn-sm btn-primary"
                                            data-toggle="modal"
                                            data-target="#bank_Modal"><span class="glyphicon glyphicon-pencil"></span>编辑
                                    </button>
                                    <button @click="delbank(index)" type="button" class="btn btn-sm btn-default"><span
                                            class="glyphicon glyphicon-trash"></span>删除
                                    </button>
                                </div>
                            </td>
                        </tr>
                        <tr style="text-align: center;" v-if="bankarr.length==0">
                            <td colspan="8" class="no_date">{:strtoupper(lang('no_data'))}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!-- 分公司 页面 -->
        <div class="tab-pane" id="table-branch">
            <div class="row">
                <div class="col-md-12 text-right">
                    <button @click="addbranch" type="button" class="btn btn-primary" data-toggle="modal"
                            data-target="#branch_editModal">
                        <span class="fa fa-plus"> 添加新的分公司 </span></button>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <table class="table table-striped table-hover ntTable" v-cloak>
                        <thead>
                        <tr>
                            <th>#</th>
                            <th>名称</th>
                            <th>锁定</th>
                            <th>地址</th>
                            <th>员工</th>
                            <th>营业号</th>
                            <th>税号</th>
                            <th>编辑</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(item,index) in brancharr">
                            <td align="center">{{formatUnit(index+1,'ID')}}</td>
                            <td>{{item.name}}</td>
                            <td align="center">{{item.lock==1?'Y':'N'}}</td>
                            <td>{{item.addr}}, <br>{{item.address}}</td>
                            <td>{{item.worksnum}}</td>
                            <td>{{item.regno}}</td>
                            <td>{{item.taxno}}</td>
                            <td> {{item.updatename}}<br/>
                                <small>{{item.update_date}}</small>
                            </td>
                            <td align="right">
                                <button @click="editbranch(index)" type="button" class="btn btn-sm btn-primary"
                                        data-toggle="modal"
                                        data-target="#branch_editModal"><span class="glyphicon glyphicon-pencil"></span>编辑
                                </button>
                                <button type="button" @click="delbranch(index)" class="btn btn-sm btn-default"><span
                                        class="glyphicon glyphicon-trash"></span>{:strtoupper(lang('delete'))}
                                </button>
                            </td>
                        </tr>
                        <tr style="text-align: center;" v-if="brancharr.length==0">
                            <td colspan="9" class="no_date">{:strtoupper(lang('no_data'))}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!-- 风评 页面 -->
        <div class="tab-pane" id="table-evaluate">
            <div class="row">
                <div class="col-md-12 text-right">
                    <button type="button" @click="addevaluate" class="btn btn-primary" data-toggle="modal"
                            data-target="#co_evaluate_Modal">
                        <span class="fa fa-plus"> 添加风评 </span></button>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <table class="table table-striped table-hover ntTable">
                        <thead>
                        <tr>
                            <td>#</td>
                            <td>留言</td>
                            <td>得分</td>
                            <td>编辑</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <tbody>
                        <tr v-for="(item,index) in evaluatearr">
                            <td align="center">{{formatUnit(index+1,'ID')}}</td>
                            <td>{{item.comment}}</td>
                            <td align="right">{{item.score}}</td>
                            <td>{{item.updatename}} / {{item.update_date}}</td>
                            <td align="right">
                                <button @click="editevaluate(index)" type="button" class="btn btn-sm btn-primary"
                                        data-toggle="modal" data-target="#co_evaluate_Modal"><span
                                        class="glyphicon glyphicon-pencil"></span>编辑
                                </button>
                                <button @click="delevaluate(index)" type="button" class="btn btn-sm btn-default"><span
                                        class="glyphicon glyphicon-trash"></span>{:strtoupper(lang('delete'))}
                                </button>
                            </td>
                        </tr>
                        <tr style="text-align: center;" v-if="evaluatearr.length==0">
                            <td colspan="5" class="no_date">{:strtoupper(lang('no_data'))}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!-- 联系人添加 弹窗部分-->
    <div class="modal fade" id="linkman_Modal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabe1"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:60%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="ntModalLabel">{{companyname}}&nbsp;{:strtoupper(lang('add/alterar_contact'))}</h4>
                </div>
                <div class="modal-body">
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                            <div class="alert alert-dismissable alert-info">
                                <button type="button" class="close">×</button>
                                <p></p>
                            </div>
                            <table class="table table-striped table-hover ntTable">
                                <tbody>
                                <tr>
                                    <td>{:strtoupper(lang('names'))}<span class="required"></span></td>
                                    <td colspan="3">
                                        <div class="input-group" style="width:100%">
                                            <input type="text" class="form-control" v-model="linkdata.name">
                                            <span class="input-group-addon">
                                                <input type="checkbox" v-model="linkdata.is_main" value="1"> {:strtoupper(lang('main'))}
                                            </span>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:strtoupper(lang('job'))}<span class="required"></span></td>
                                    <td><input type="text" class="form-control" v-model="linkdata.position"></td>
                                    <td>{:strtoupper(lang('gender'))}<span class="required"></span></td>
                                    <td>
                                        <label class="radio-inline">
                                            <input type="radio" name="sex" v-model="linkdata.sex" value="1" checked>{:lang('man')}
                                        </label>
                                        <label class="radio-inline">
                                            <input type="radio" name="sex" v-model="linkdata.sex" value="0">{:lang('woman')}
                                        </label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:strtoupper(lang('contact_information'))}<span class="required"></span></td>
                                    <td colspan="3">
                                        <div class="input-group" style="width:100%">
                                            <div class="input-group-btn" style="width: 150px;">
                                                <select name="" id="sellinkfun" class="form-control"
                                                        v-model="linkdata.linkfunid">
                                                    <option value="" selected>{:lang('please_select')}</option>
                                                    <option :value="item.id" v-for="(item,index) in linkfun">
                                                        {{item.content}}
                                                    </option>
                                                </select>
                                            </div>
                                            <input type="text" class="form-control" v-model="linkdata.linkval">
                                            <div class="input-group-btn">
                                                <button type="button" class="btn btn-primary" @click="addlinkmethod">
                                                    <span class="glyphicon glyphicon-plus"> </span>
                                                    {:strtoupper(lang('add'))}
                                                </button>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <table class="table table-striped table-hover ntTable">
                                <thead>
                                <tr>
                                    <th>{:strtoupper(lang('type'))}</th>
                                    <th>{:strtoupper(lang('content'))}</th>
                                    <th>{:strtoupper(lang('operate'))}</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr v-for="(item,index) in linkdata.linkarr">
                                    <td>{{item.linkname}}</td>
                                    <td>{{item.content}}</td>
                                    <td class="text-right">
                                        <div class="btn-group">
                                            <button type="button" class="btn btn-default"
                                                    @click="editlinkfun(index)"><span
                                                    class="glyphicon glyphicon-pencil"></span>{:strtoupper(lang('edit'))}
                                            </button>
                                            <button type="button" class="btn btn-default"
                                                    @click="dellinkitem(index)"><span
                                                    class="glyphicon glyphicon-trash"></span>{:strtoupper(lang('delete'))}
                                            </button>
                                        </div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><span
                            class="glyphicon glyphicon-remove"></span>{:strtoupper(lang('cancel'))}
                    </button>
                    <button @click="addlinkdata" type="button" class="btn btn-primary"
                            style="padding-left:24px;padding-right:24px"><span
                            class="glyphicon glyphicon-floppy-disk"></span>{:strtoupper(lang('save'))}
                    </button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
    <!-- 银行添加 弹窗部分-->
    <div class="modal fade" id="bank_Modal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabe3"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:60%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="ntModalLabe3">{{companyname}}&nbsp;{:strtoupper(lang('add/alterar_bank_account'))}</h4>
                </div>
                <div class="modal-body">
                    <div class="row clearfix">
                        <div class="col-md-12 column">
                            <div class="alert alert-dismissable alert-info">
                                <button type="button" class="close">×</button>
                                <p></p>
                            </div>
                            <table class="table table-striped table-hover ntTable">
                                <tbody>
                                <tr>
                                    <td>{:strtoupper(lang('bank'))}<span class="required"></span></td>
                                    <td>
                                        <select class="form-control" v-model="bankdata.banks_id">
                                            <option value="">{:lang('please_select')}</option>
                                            <option v-for="(item,index) in banklist" :value="item.id">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:strtoupper(lang('account_opening_bank_branch'))}<span class="required"></span>
                                    </td>
                                    <td><input type="text" class="form-control" v-model="bankdata.bankname"></td>
                                </tr>
                                <tr>
                                    <td>{:strtoupper(lang('account_name'))}<span class="required"></span></td>
                                    <td>
                                        <input type="text" class="form-control" v-model="bankdata.account_name">
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:strtoupper(lang('account'))}<span class="required"></span></td>
                                    <td colspan="3">
                                        <div class="input-group" style="width:100%">
                                            <input type="text" class="form-control" v-model="bankdata.account_num">
                                            <span class="input-group-addon">
                                                <input type="checkbox" v-model="bankdata.is_main" value="1"> {:strtoupper(lang('main'))}
                                            </span>
                                        </div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal"><span
                            class="glyphicon glyphicon-remove"></span>{:strtoupper(lang('cancel'))}
                    </button>
                    <button type="button" @click="addbankdata" class="btn btn-primary"
                            style="padding-left:24px;padding-right:24px"><span
                            class="glyphicon glyphicon-floppy-disk"></span>{:strtoupper(lang('save'))}
                    </button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
    <!-- 分公司添加 弹窗部分-->
    <div class="modal fade" id="branch_editModal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel5"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:70%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="ntModalLabel5">{{companyname}}&nbsp; 分公司添加/更改</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="alert alert-dismissable alert-info">
                                <button type="button" class="close">×</button>
                                <p></p>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <table class="table">
                                <tbody>
                                <tr>
                                    <td>名称<span class="required"></span></td>
                                    <td colspan="4">
                                        <input type="text" class="form-control" v-model="branchdata.name">
                                    </td>
                                    <td align="right">
                                        <button @click="lockbut" class="btn btn-default btn-checkbox" style="width:10rem">
                                            <input type="checkbox" v-model="branchdata.lock" value="0"> 锁定
                                        </button>
                                    </td>
                                </tr>
                                <tr>
                                    <!--有国家id的话就不显示国家-->
                                    <td v-if="country_id==''">国家<span class="required"></span></td>
                                    <td v-if="country_id==''">
                                        <select class="form-control col-md-2" v-model="branchdata.country_id"
                                                @change="selchangebranchfun('provinces',branchdata.country_id)">
                                            <option selected value="">{:lang('please_select')}</option>
                                            <option :value="item.id" v-for="(item,index) in countryname">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </td>
                                    <td>省份<span class="required"></span></td>
                                    <td>
                                        <select class="form-control" v-model="branchdata.province_id"
                                                @change="selchangebranchfun('city',branchdata.province_id)">
                                            <option selected value="">{:lang('please_select')}</option>
                                            <option :value="item.id" v-for="(item,index) in branchdata.provinces">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </td>
                                    <td>城市<span class="required"></span></td>
                                    <td>
                                        <select class="form-control" v-model="branchdata.city_id"
                                                @change="selchangebranchfun('town',branchdata.city_id)">
                                            <option selected value="">{:lang('please_select')}</option>
                                            <option :value="item.id" v-for="(item,index) in branchdata.city">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </td>
                                    <td>乡镇<span class="required"></span></td>
                                    <td>
                                        <select class="form-control" v-model="branchdata.town_id">
                                            <option selected value="">{:lang('please_select')}</option>
                                            <option :value="item.id" v-for="(item,index) in branchdata.town">
                                                {{item.name}}
                                            </option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>地址<span class="required"></span></td>
                                    <td colspan="5"><input type="text" class="form-control" v-model="branchdata.addr">
                                    </td>
                                </tr>
                                <tr>
                                    <td>邮编</td>
                                    <td>
                                        <input type="text" class="form-control" v-model="branchdata.zipcode">
                                    </td>
                                    <td>员工数量<span class="required"></span></td>
                                    <td>
                                        <select class="form-control" v-model="branchdata.works">
                                            <option value="">{:lang('please_select')}</option>
                                            <option :value="key" v-for="(item,key,index) in number">
                                                {{item}}
                                            </option>
                                        </select>
                                    </td>
                                    <td>营业号</td>
                                    <td><input type="text" class="form-control" v-model="branchdata.regno"></td>
                                </tr>
                                <tr>

                                    <td>税号</td>
                                    <td><input type="text" class="form-control" v-model="branchdata.taxno"></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        <span class="glyphicon glyphicon-remove"></span>取消
                    </button>
                    <button @click="addbranchdata" type="button" class="btn btn-primary"
                            style="padding-left:24px;padding-right:24px">
                        <span class="glyphicon glyphicon-floppy-disk"></span>保存
                    </button>
                </div>
            </div>
        </div>
    </div>
    <!-- 风评 弹窗部分-->
    <div class="modal fade" id="co_evaluate_Modal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel7"
         aria-hidden="true">
        <div class="modal-dialog modal-lg" style="width:70%">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="ntModalLabel7">{{companyname}}&nbsp;风评添加/更改</h4>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="alert alert-dismissable alert-info">
                                <button type="button" class="close">×</button>
                                <p></p>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-1">
                            评价 <span class="required"></span>
                        </div>
                        <div class="col-md-9">
                            <textarea class="form-control" style="height: 10rem"
                                      v-model="evaluatedata.comment"></textarea>

                        </div>
                        <div class="col-md-2">
                            <select name="" id="" class="form-control" v-model="evaluatedata.score">
                                <option value="0">没有评分</option>
                                <option value="1">1（差）</option>
                                <option value="2">2</option>
                                <option value="3">3</option>
                                <option value="4">4</option>
                                <option value="5">5（普通）</option>
                                <option value="6">6</option>
                                <option value="7">7（好）</option>
                                <option value="8">8</option>
                                <option value="9">9</option>
                                <option value="10">10（优）</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        <span class="glyphicon glyphicon-remove"></span>取消
                    </button>
                    <button @click="addevaluatedata" type="button" class="btn btn-primary"
                            style="padding-left:24px;padding-right:24px">
                        <span class="glyphicon glyphicon-floppy-disk"></span>保存
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>


<script src="/static/Admin/js/companyinfo.js"></script>
{include file="public/foot"/}